package com.linzelin.po2;

public class Client {
    public static void main(String[] args) {
        //创建需要被代理的角色
        Host host = new Host();
        //代理角色获取
        ProxyInvocationHandler pih = new ProxyInvocationHandler();
        pih.setRent(host);
        //传入对应的要增强的角色
        Rent proxy = (Rent) pih.getPorxy();
        proxy.rent();
    }
}
